package com.soft.testmybatis.entity;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/6/10
 */
public class Orders {
    private Integer id;
    private Integer userId;
    private String number;
    private LocalDateTime createTime;
    private String note;

    private User user;
    private List<OrderDetail> orderDetails;

    public Orders() {
    }

    public Orders(Integer id, Integer userId, String number, LocalDateTime createTime, String note) {
        this.id = id;
        this.userId = userId;
        this.number = number;
        this.createTime = createTime;
        this.note = note;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<OrderDetail> getOrderDetails() {
        return orderDetails;
    }

    public void setOrderDetails(List<OrderDetail> orderDetails) {
        this.orderDetails = orderDetails;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    public String toString() {
        return "Orders{" +
                "id=" + id +
                ", userId=" + userId +
                ", number='" + number + '\'' +
                ", createTime=" + createTime +
                ", note='" + note + '\'' +
                '}';
    }
}
